#include <stdio.h>

int main (int argc, char * argv[]) {

  FILE *fp;
  fp = fopen(argv[1], "r");
  int temp;
  int result;
  int tot;
  int count = 0;
  tot =0;
  while (1) {
    result = fscanf(fp, " %d ", &temp);
    if(result != 1) break;
    tot +=temp;
    count++;
    if (count%1000==0) printf(".");
  }

  printf("count = %d, tot =%d\n",count, tot);

}
